1. Field of the Invention
The present invention relates to image processing. Particularly, the present invention relates to an image processing method, apparatus and program for checking the effect of blur correction processing performed on digital photograph images.
2. Description of the Related Art
Digital photograph images are obtained by photoelectrically reading out photograph images recorded on photograph films such as negative films and color reversible films with a readout device such as a scanner. Digital photograph images are also obtained by photographing subjects with digital still cameras (DSC). When the digital photograph images are obtained, various kinds of image processing are performed on the digital photograph images, and images after image processing are displayed, printed, or the like. One of the examples of the image processing is blurred image restoration processing for removing a blur from a fuzzy image (blurred image).
When photograph images are obtained by photographing a subject, the images may become fuzzy because of an out-of-focus blur or a blur due to hand motion. The out-of-focus blur is created when focal length is not adjusted appropriately, whereas the blur due to hand motion is created when a camera is moved because of the motion of the hands of a photographer (hereinafter referred to as a motion blur, for short). If a blur is an out-of-focus blur, a point image spreads two-dimensionally. In other words, the out-of-focus blur spreads non-directionally in the photograph image. If the blur is a motion blur, the point image traces a certain locus, and the point image in the image spreads linearly. In other words, the motion blur spreads directionally in the photograph image.
Conventionally, various methods for restoring blurred images have been proposed in the field of digital photograph images. If information such as the direction of a motion blur and the width of the motion blur is obtained during photography, the blurred image can be restored by applying a restoration filter such as a Wiener filter and an inverse filter to the obtained photograph image. Therefore, a method for restoring blurred images by installing an apparatus (for example, an acceleration sensor) for obtaining the direction of the motion blur and the width of the motion blur in a photography apparatus is well known. In this method, information such as the direction of the motion blur and the width of the motion blur are obtained simultaneously with photography, and the blurred image is restored based on the obtained information (for example, U.S. Patent Application Publication No. 20030002746).
Further, as disclosed in Japanese Unexamined Patent Publication No. 7(1995)-121703), for example, a method for restoring a blurred image (image including a blur) by setting a deterioration function with respect to the blurred image is also well known. In this method, the blurred image is restored by applying a restoration filter corresponding to the deterioration function set for the image. Then, an image after restoration is evaluated, and the deterioration function is set again based on the result of evaluation. The restoration, evaluation, and new setting of the deterioration function are repeated until an image having desired quality is obtained.
Meanwhile, as cellular phones rapidly became popular, the performance of the cellular phones has improved. Especially, the performance of digital cameras (hereinafter referred to as cellular cameras, for short) attached to the cellular phones has remarkably improved. In recent years, the number of pixels of the cellular cameras exceeded one million. Therefore, the cellular cameras are used in a similar manner to ordinary digital cameras. Therefore, when people travel with their friends, they often use their cellular cameras to take their photographs. Further, many users of the cellular phones take photographs of their favorite TV stars or athletes with their cellular cameras. Under these circumstances, more users of the cellular phones who enjoy the photographs obtained with their cellular cameras by displaying them on the monitors of their cellular phones also print the photographs in a similar manner to printing of those obtained with ordinary digital cameras.
However, since the main bodies (cellular phones) of the cellular cameras are not ergonomically designed as specialized photography devices, there is a problem that it is not easy to hold the cellular phones during photography. Further, since no strobes are provided in the cellular cameras, the shutter speeds of the cellular cameras are slower than those of the ordinary digital cameras. Therefore, when a photograph of a subject is taken with a cellular camera, possibility of creation of a motion blur is high in comparison with photography with ordinary cameras. If the motion blur is large, the photographer can detect the blur in the image displayed on the monitor of his/her cellular phone. However, if the motion blur is small, he/she often does not notice the blur in the image displayed on the monitor, and he/she notices the blur only when the image is printed. Therefore, it is required to perform processing for correcting motion blurs in photograph images obtained with the cellular cameras.
However, in competition among cellular phone manufacturing companies, each company is trying to reduce the sizes of cellular phones as well as improving the performance of the cellular phones and reducing the production cost thereof. Therefore, it is not practical to install a device for obtaining the direction and width of a motion blur in the camera attached to the cellular phones. Hence, the method as disclosed in U.S. Patent Application Publication 20030002746 can not be applied to the cellular phones. Further, in the method as disclosed in Japanese Unexamined Patent Publication No. 7(1995)-121703, it is required to repeat processing such as setting of a deterioration function, restoration, evaluation, and resetting of the deterioration. Therefore, there is a problem that processing time becomes long, and the efficiency of processing drops. Under these circumstances, there is a method for performing correction processing by obtaining blur information (the direction of a blur, the width of the blur, or the like) of an image by analyzing the image. In this method, the image is corrected by setting a parameter for correcting blurs based on the obtained blur information. For example, when a blur is created in an image, a point image in the image spreads. Specifically, the shapes of edges in the image are directly related to the blur. Therefore, this characteristic may be utilized to perform correction processing. In this method, blur information is obtained by analyzing the shapes of the edges in the image to perform correction processing. In the method as described above, the blur information can be obtained from the digital photograph images without installing a special device in the photography device. Further, since correction processing is performed based on the blur information, it is not required to repeat processing as in the method disclosed in Japanese Unexamined Patent Publication No. 7(1995)-121703. Hence, efficiency of processing is high.
As described above, there are many kinds of methods for performing blur correction processing on digital photograph images, and the timing of correction processing is different from each other among the methods. For example, blur correction processing is performed on digital photograph images which will be printed, as preprocessing for printing the digital photograph images. Alternatively, blur correction processing is performed on images attached to e-mails, at servers for relaying the e-mails between cellular phones. Further, in some cases, when images are obtained by photography with digital cameras (including cellular cameras), blur correction processing is performed on the images within the digital cameras, and the corrected images are stored in storage means such as memory cards attached to the digital cameras.
The corrected images are displayed on display screens such as monitors to cause users to check the effects of correction processing performed on the digital photograph images. However, for example, if an image is obtained by photographing with a cellular camera, the obtained image will be displayed on the monitor of the cellular camera. However, since the resolution of the monitor is low, the size of the corrected image must be reduced so that the image can be displayed on the monitor of the cellular phone. Since the reduced image is displayed on the monitor of the cellular camera, it is impossible to check the effects of blur correction processing. Therefore, among digital cameras which are on sale, there are digital cameras in which the condition of blurs can be more easily checked by making the users of the digital cameras specify display regions in images obtained by photography. In these digital cameras, the users display the images of the specified display regions on the monitors of the digital cameras at a 1:1 magnification ratio or by enlarging them. If the digital cameras as described above are used, the effects of blur correction processing can be checked by reading out an image on which correction processing has been performed, and displaying an image of the region specified by the users at a 1:1 magnification ratio or by enlarging them.
Alternatively, as disclosed in U.S. Patent Application Publication No. 20030184667, a method for extracting an image of a predetermined region such as the central region of the image, and displaying it at a 1:1 magnification ratio has been proposed. Further, a method for dividing an image into a plurality of regions and sequentially displaying the divided regions at a 1:1 magnification ratio has been proposed.
However, in the method of making users specify display regions, the users are required to specify the regions which will be checked, and that is troublesome for the users. Further, although blurs are evenly distributed in the whole regions of the images, there are regions in which the blurs can be easily detected, and there are also regions in which the blurs cannot be easily detected, or cannot be detected at all. For example, when an image is divided into regions as illustrated by dotted lines in FIG. 3, if only a block in the upper left corner of the image is observed, it is impossible to judge whether the image is blurred. However, a blur is clearly distinguishable in a block including the hair region of a subject (a person in the example illustrated in FIG. 3), or the contours of the ears of the subject or the like. When the users check the effects of blur correction processing performed on the image as illustrated in FIG. 3, if they check a region such as the block in the upper left corner, in which the blur does not tend to clearly appear, it is impossible to know whether the blur is corrected. It is also impossible to know the magnitude of correction. Further, in the method of making the users specify display regions, the users cannot always accurately specify the regions which are appropriate for checking the effects of blur correction processing. Therefore, the users may erroneously specify the regions by making wrong judgments.
Further, in a method of displaying a region at a predetermined position of an image by extracting it from the image, as disclosed in U.S. Patent Application Publication No. 20030184667, there is a problem that if the region at the predetermined position of the image is not appropriate for checking the effects of blur correction processing, the users cannot accurately judge the effects of correction processing. Further, in the method of dividing an image into a plurality of regions and sequentially displaying the divided regions, there is a problem that a long time is required for processing. Further, the load of processing on the apparatus is heavy, and the operation is troublesome for the users.